package com.niit.mall.user.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.niit.mall.user.domain.po.Role;
import com.niit.mall.user.domain.po.UserRole;
import com.niit.mall.user.domain.vo.UserRoleVO;
import com.niit.mall.user.mapper.UserRoleMapper;
import com.niit.mall.user.service.IUserRoleService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @BelongsProject: pardo_mall_backend
 * @BelongsPackage: com.niit.mall.user.service.impl
 * @Author: ChuXuan
 * @CreateTime: 2025-06-09  15:46
 * @Description: TODO
 * @Version: 1.0
 */
@Service
public class UerRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements IUserRoleService{

    /**
     * 根据用户id查询用户角色
     * @param id 用户id
     * @return 用户角色
     */
    @Override
    public UserRole queryUserRoleByUserId(Long id) {

        return lambdaQuery().eq(UserRole::getUserId, id).one();
    }
}
